package edu.tum.cs.i1.pse;

import java.net.MalformedURLException;
import java.net.URL;

public class Client {

	public static void main(String[] args) {
		System.out.println("Client starting ...");
		
		ConnectorInterface cacheProxy = new CacheProxy();
		
		try {
			URL u1 = new URL("http://www1.in.tum.de/lehrstuhl_1/images/people/Bernd%20Bruegge.jpg");
			System.out.println("Opening connection " + u1);
			cacheProxy.open(u1);
			
//			try {
//				Thread.sleep(3000);
//			} catch (InterruptedException e) {e.printStackTrace();}
			
			u1 = new URL("http://www1.in.tum.de/lehrstuhl_1/images/people/Bernd%20Bruegge2.jpg");
			System.out.println("Opening connection " + u1);
			cacheProxy.open(u1);
			
			u1 = new URL("http://en.wikipedia.org/wiki/Overfitting");
			System.out.println("Opening connection " + u1);
			cacheProxy.open(u1);
				
		} catch (MalformedURLException e) {
			e.printStackTrace();
		}
		System.out.println("Client stopped");
	}
}
